import java.util.Arrays;

/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-08-01
 * Time: 22:54
 */
public class Test9 {
    public static void main(String[] args) {
        int [] arr={1,2,3,4,5,6};
        int [] news = copyOf(arr);
        System.out.println(Arrays.toString(news));
    }
    public static int[] copyOf(int[] arr) {
        int[] arr2=new int[arr.length];
        for(int i=0;i<arr.length;i++) {
            arr2[i] = arr[i];
        }
        return arr2;
    }
}
